/**
 * Copyright(c): 2017 com.mjduan All rights reserved.
 * 项目名：WebMvc
 * 注意：未经作者允许，不得外传
 */
package com.mjduan.project.web.product.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mjduan.project.web.product.entity.Product;

/**
 * @author mjduan@yahoo.com mjduan 2018-04-29 08:19
 * @version 1.0
 * @since 1.0
 */
@Controller
@RequestMapping(value = "/webmvc/product")
public class ProductQueryController {

    @RequestMapping(value = "query")
    @ResponseBody
    public Product query(){
        Product product = new Product();
        product.setId(123);
        product.setName("Laptop");
        product.setDescription("This is laptop made by Dell enterprise");
        return product;
    }
}
